import Mock, { Random } from 'mockjs-async';

module.export = [
  Mock.mock(RegExp(`/testMock` + ".*"), 'post', {
    "data|5": [{
      _id:'@id',
      face:"@image('32x32')",
      cName: '@cname',
      is:'@boolean',
      num: '@integer(32,64)',
      float:'@float(0,100,1,2)',
      dateTime:"@datetime('yyyy-MM-dd HH:mm:ss')",
      text:'@cparagraph(1,3)',
      ip:'@ip',
      step:'@range(0,10,2)',
      "value|+1":1
    }],
  }),//测试数据，具体可查阅官方文档：http://mockjs.com/examples.html
  Mock.mock(RegExp(`/testOptions` + ".*"), 'get', {
    "data|10": [{
      label:'@ctitle',
      "value|+1":1
    }],
  }),
]